<template>
  <router-view v-slot="{ Component }">
    <component :is="Component" v-if="Component && isRouterActive"/>
  </router-view>
</template>
<script setup lang="ts">
import { computed,provide,nextTick,ref } from 'vue'

import { useRoute } from 'vue-router'
const route = useRoute()

// 刷新页面
const isRouterActive = ref(true)
provide('reload', () => {
  isRouterActive.value = false
  nextTick(() => {
    isRouterActive.value = true
  })
})
</script>
<style scoped lang="scss">

</style>
